import { Injectable }    from '@angular/core';
import { Headers, Http } from '@angular/http';
import { Observable }     from 'rxjs/Observable';
import 'rxjs/add/operator/toPromise';
import { ReadComponent } from './read.component';
var base=require('modules/base.js');

@Injectable()
 export class ReadService {
 	constructor(private http: Http) { }
 	create():Observable<ReadComponent>{
 		return this.http
 							.post(base(57),'',{})
 							.toPromise()
 							.then(res=>res.json().data as ReadComponent)
 							.catch(function(){
 								consoel.error(base(57));
 							})
 	}
 }
